package com.teziyou.commodity.logic;

import java.util.Map;

import org.springframework.stereotype.Service;

import com.teziyou.commodity.service.TicketService;
import com.teziyou.commodity.util.ConvertUtil;

@SuppressWarnings({"rawtypes", "unchecked"})
@Service
public class ShelfLogic extends TicketService{
	
	public Map loadTicket(long ticketId) {
		Map ticket = super.findTicketById(ticketId);
		long sceneId = ConvertUtil.toInt(ticket.get("scenic_id"));
		Map scene = super.findSceneById(sceneId);
		ticket.put("scene_name", scene.get("name"));
		ticket.put("imgs", super.findImgsByTicketId(ticketId));
		return ticket;
	}

}
